﻿using Basic.FlowApplication.Interface;
using WeDonekRpc.Client.Attr;
using WeDonekRpc.Client.Interface;
using WeDonekRpc.Helper.Config;

namespace Basic.FlowApplication.Config
{
    [ClassLifetimeAttr(ClassLifetimeType.SingleInstance)]
    internal class FlowConfig : IFlowConfig
    {
        public FlowConfig ( ISysConfig config )
        {
            IConfigSection section = config.GetSection("flow");
            section.AddRefreshEvent(this._Refresh);
        }

        private void _Refresh ( IConfigSection section, string name )
        {
            this.AuditEmpMax = section.GetValue("AuditEmpMax", 10);
        }
        /// <summary>
        /// 获取审核人最大限制人数
        /// </summary>
        public int AuditEmpMax
        {
            get;
            set;
        }
        /// <summary>
        /// 退回待办TAG
        /// </summary>
        public string StaySubmitAuditTag
        {
            get;
        } = "001";
        /// <summary>
        /// 退回待办TAG
        /// </summary>
        public string ReturnMsgTag
        {
            get;
        } = "002";

        /// <summary>
        /// 打回修改TAG
        /// </summary>
        public string RepulseMsgTag
        {
            get;
        } = "003";
    }
}
